<?php
declare (strict_types = 1);

namespace app\model;

use think\Model;

/**
 * @mixin \think\Model
 */
class Index extends Model
{
    protected $table='good';
    //展示列表页面
    public static function showList(){
        return self::paginate(20);
    }
    //展示详情页面
    public static function showDetail($g_id){
        return self::where('g_id',$g_id)->find();
    }
    //列表浏览量数据修改
    public static function changeData($g_id,$listData){
        return self::update(['num'=>$listData],['g_id'=>$g_id]);
    }

}
